package cn.edu.scau.cmi.hekaimin.abstractFactoryMethod;

import cn.edu.scau.cmi.hekaimin.simpleFactoryMethod.Insurance;

public abstract class CompanyFactory {
	public static final String PICC = "PICC";
	public static final String PINGAN = "PingAn";
	public abstract Insurance getInsurance(String insurance);
	public abstract String show();
    public static CompanyFactory getCompanyFactory(String Company) {
    	CompanyFactory cf = null;
    	switch(Company) {
    	case PICC: cf = new PICCFactory();break;
    	case PINGAN: cf = new PingAnFactory();break;
    	default: break;
    	}
		return cf;  	
    }
}
